package model;

import java.io.IOException;

public abstract class Medicine extends Item {
    public Medicine() {
        super();
    }

    public Medicine(int num, String name, String type, String desc, String location) {
        super(num,name,type,desc,location);
    }

    static protected int maxnum=10;

    public boolean check(int x) {
        return x +num<= maxnum;
    }

    @Override
    public abstract void use(Player player) throws IOException;

    public abstract String getDesc();

    public int getMaxnum(){
        return maxnum;
    }
}
